// To parse this JSON data, do
//
//     final groupListBean = groupListBeanFromJson(jsonString);

import 'dart:convert';

GroupListBean groupListBeanFromJson(String str) => GroupListBean.fromMap(json.decode(str));

String groupListBeanToJson(GroupListBean data) => json.encode(data.toMap());

class GroupListBean {
  int total;
  int totalPage;
  bool next;
  List<Item> items;

  GroupListBean({
    required this.total,
    required this.totalPage,
    required this.next,
    required this.items,
  });

  factory GroupListBean.fromMap(Map<String, dynamic> json) => GroupListBean(
    total: json["total"],
    totalPage: json["totalPage"],
    next: json["next"],
    items: List<Item>.from(json["items"].map((x) => Item.fromMap(x))),
  );

  Map<String, dynamic> toMap() => {
    "total": total,
    "totalPage": totalPage,
    "next": next,
    "items": List<dynamic>.from(items.map((x) => x.toMap())),
  };
}

class Item {
  String title;
  List<Result> result;

  Item({
    required this.title,
    required this.result,
  });

  factory Item.fromMap(Map<String, dynamic> json) => Item(
    title: json["title"],
    result: List<Result>.from(json["result"].map((x) => Result.fromMap(x))),
  );

  Map<String, dynamic> toMap() => {
    "title": title,
    "result": List<dynamic>.from(result.map((x) => x.toMap())),
  };
}

class Result {
  int examRoomId;
  String examRoomName;
  int questionAmount;
  int userAmount;
  int onlineUserAmount;
  String examFormat;
  String beginTime;
  String examRoomStatus;

  Result({
    required this.examRoomId,
    required this.examRoomName,
    required this.questionAmount,
    required this.userAmount,
    required this.onlineUserAmount,
    required this.examFormat,
    required this.beginTime,
    required this.examRoomStatus,
  });

  factory Result.fromMap(Map<String, dynamic> json) => Result(
    examRoomId: json["examRoomId"],
    examRoomName: json["examRoomName"],
    questionAmount: json["questionAmount"],
    userAmount: json["userAmount"],
    onlineUserAmount: json["onlineUserAmount"],
    examFormat: json["examFormat"],
    beginTime: json["beginTime"],
    examRoomStatus: json["examRoomStatus"],
  );

  Map<String, dynamic> toMap() => {
    "examRoomId": examRoomId,
    "examRoomName": examRoomName,
    "questionAmount": questionAmount,
    "userAmount": userAmount,
    "onlineUserAmount": onlineUserAmount,
    "examFormat": examFormat,
    "beginTime": beginTime,
    "examRoomStatus": examRoomStatus,
  };
}
